package com.ebid.templates.twenty;

import com.ebid.templates.utils.ParameterUtils;

import java.text.MessageFormat;

public class EvaluationReport {
    private static String evaluationReport="<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n"+
            "<evaluationReport> \n" +
            "    <tenderProjectCode>{0}</tenderProjectCode>\n" +
            "    <bidSectionCode>{1}</bidSectionCode>\n" +
            "    <unifiedDealCode>{2}</unifiedDealCode>\n" +
            "    <evaluationContent>{3}</evaluationContent>\n" +
            "    <submitTime>{4}</submitTime>\n" +
            "    <endTime>{5}</endTime>\n" +
            "    <evaluationResult>{6}</evaluationResult>\n" +
            "    <attachmentSetCode>{7}</attachmentSetCode>\n" +
            "    <platFromCode>{8}</platFromCode>\n" +
            "    <pubServicePlatCode>{9}</pubServicePlatCode>\n" +
            "    <dataTimeStamp>{10}</dataTimeStamp>\n" +
            "</evaluationReport>";

    public static void setEvaluationReport(String evaluationReport,String s0,String s1,String s2,String s3,String s4,String s5,String s6,String s7,String s8,String s9,String s10) {
        EvaluationReport.evaluationReport = MessageFormat.format(evaluationReport,s0,s1,s2,s3,s4,s5,s6,s7,s8,s9,s10);
    }

    public static void setEvaluationReport(){
        setEvaluationReport(evaluationReport,
                                            ParameterUtils.get("tenderProjectCode"),
                                            ParameterUtils.get("bidSectionCode"),
                                            ParameterUtils.get("unifiedDealCode"),
                                            ParameterUtils.get("evaluationContent"),
                                            ParameterUtils.get("submitTime"),
                                            ParameterUtils.get("endTime"),
                                            ParameterUtils.get("evaluationResult"),
                                            ParameterUtils.get("attachmentSetCode"),
                                            ParameterUtils.get("platFromCode"),
                                            ParameterUtils.get("pubServicePlatCode"),
                                            ParameterUtils.get("dataTimeStamp")
                );
    }

//    public static void main(String[] args) {
//
//        setEvaluationReport();
//        System.out.println(evaluationReport);
//    }
}
